﻿<%@ Page Title="POSSystem | Stock Transfer" Language="C#" MasterPageFile="~/Application.Master"
    Theme="POSSystem" AutoEventWireup="true" CodeBehind="StockTransfer.aspx.cs" Inherits="WebUI.StockTransfer" %>

<%@ Register Src="~/Controls/POSControls/SaleLookup.ascx" TagName="SaleLookup" TagPrefix="uc" %>
<%@ Register Src="~/Controls/SysControls/PageHeader.ascx" TagPrefix="uc" TagName="PageHeader" %>
<%@ Register Src="~/Controls/POSControls/TransferDetailsCtrl.ascx" TagPrefix="uc"
    TagName="TransferDetails" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ApplicationHeadHolder" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ApplicationContentHolder" runat="server">
    <script type="text/javascript">
        function onRemoveTransferDetails() {
            return confirm('Are you sure to delete these selected items?');
        }

        function showPrintDlg(key) {
            var returnValue = window.showModalDialog(key, '', 'dialogWidth=800px;dialogHeight=600px;resizable=yes;help=no;unadorned=yes;');
        }
    </script>
    <uc:PageHeader ID="pageHeader" Text="Stock Transfer" ImageURL="~/Images/CC-File-Transfer-3001.gif"
        runat="server" />
    <table width="100%">
        <tr>
            <td style="width: 75%; text-align: left; vertical-align: top">
                <asp:Panel ID="panelProduct" runat="server" class="primaryPanel">
                    <div class="titleBar">
                        <asp:Label ID="Label4" runat="server" CssClass="titleContent">Stock Transfer</asp:Label>
                    </div>
                    <div class="primaryFrameNoBorder">
                        <asp:UpdatePanel ID="updateTrans" runat="server">
                            <ContentTemplate>
                                <center>
                                    <table>
                                        <tr>
                                            <td style='text-align: right; vertical-align: top'>
                                                <asp:Label ID="Label2" runat="server" CssClass='labelMessage' Text="Transfer#:"></asp:Label>
                                            </td>
                                            <td style='text-align: left; vertical-align: top'>
                                                <asp:TextBox Width="140px" ID='txtNO' runat="server" ReadOnly="true"></asp:TextBox>
                                            </td>
                                            <td style='text-align: right; vertical-align: top'>
                                                <asp:Label ID="Label6" runat="server" CssClass='labelMessage' Text="Transfered by User:"></asp:Label>
                                            </td>
                                            <td style='text-align: left; vertical-align: top'>
                                                <asp:Label ID="lblUser" runat="server" CssClass='labelMessage' Text=""></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style='text-align: right; vertical-align: top'>
                                                <asp:Label ID="lblStockLocation" runat="server" CssClass='labelMessage' Text="Destination:"></asp:Label>
                                            </td>
                                            <td style='text-align: left; vertical-align: top'>
                                                <asp:DropDownList Width="150px" ID="ddlBranch" runat="server">
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator Display="Dynamic" ValidationGroup="Save" ID="RequiredFieldValidator2"
                                                    runat="server" ControlToValidate="ddlBranch" class="requiredField" Text="required"
                                                    ErrorMessage="required"></asp:RequiredFieldValidator>
                                            </td>
                                            <td style='text-align: right; vertical-align: top'>
                                                <asp:Label ID="Label3" runat="server" CssClass='labelMessage' Text="Transfer Date:"></asp:Label>
                                            </td>
                                            <td style='text-align: left; vertical-align: top'>
                                                <asp:TextBox Width="100px" ID="txtTransferDate" runat="server"></asp:TextBox>
                                                <asp:RequiredFieldValidator Display="Dynamic" ValidationGroup="Save" ID="RequiredFieldValidator1"
                                                    runat="server" ControlToValidate="txtTransferDate" class="requiredField" Text="required"
                                                    ErrorMessage="required"></asp:RequiredFieldValidator>
                                                <cc1:CalendarExtender ID="calTransferDate" runat="server" TargetControlID="txtTransferDate"
                                                    Format="dd MMM yyyy">
                                                </cc1:CalendarExtender>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td style='text-align: right; vertical-align: top'>
                                                <asp:Label ID="Label5" runat="server" CssClass='labelMessage' Text="Description:"></asp:Label>
                                            </td>
                                            <td colspan="3" style='text-align: left; vertical-align: top'>
                                                <asp:TextBox ID="txtDescription" runat="server" TextMode="MultiLine" Width="100%"
                                                    Rows="5"></asp:TextBox>
                                            </td>
                                        </tr>
                                    </table>
                                    <br />
                                    <div>
                                        <table class="toolbar" width="100%">
                                            <tr>
                                                <td>
                                                    <asp:LinkButton class="tbbutton" ID="btnRemoveTransferDetails" runat="server" OnClientClick="return onRemoveTransferDetails();"
                                                        OnClick="btnRemoveTransferDetails_OnClick">
                                                        <img src="Images/Delete.gif" /><asp:Label ID="label7" runat="server" Text="Delete"></asp:Label>
                                                    </asp:LinkButton>
                                                </td>
                                            </tr>
                                        </table>
                                    </div>
                                    <uc:TransferDetails Width="100%" AllowPaging="false" AllowSorting="false" SaveOnCommit="false" AllowSelecting="true" ID="transferDetails" runat="server" />
                                    <div style="float:right">
                                        &nbsp;&nbsp;<asp:CheckBox ID="chkAutoPrint" runat="server" Text="Auto print after Transfer" Checked="true" />
                                    </div>
                                    <br />
                                    <asp:Button ID="btnClear" runat="server" Text="Clear All" OnClick="btnClear_OnClick" />
                                    <asp:Button ID="btnTransfer"  ValidationGroup="Save" runat="server" Text="Transfer" OnClick="btnTransfer_OnClick" />
                                    <asp:HiddenField ID="hidNewID" runat="server" />
                                    &nbsp;&nbsp;
                                    <asp:Button ID="btnPrint" runat="server" Text="Print" OnClick="btnPrint_OnClick" />
                                    <br />
                                    <div style='text-align:left'>
                                        <asp:UpdatePanel ID="updateErr" runat="server" UpdateMode="Conditional"> 
                                            <ContentTemplate >
                                                <asp:Panel ID="panelErr" runat="server"></asp:Panel>
                                            </ContentTemplate>
                                        </asp:UpdatePanel>
                                    </div>
                                     
                                   
                                </center>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                </asp:Panel>
            </td>
            <td style="text-align: right; vertical-align: top">
                <asp:Panel ID="panel1" runat="server" class="primaryPanel">
                    <div class="titleBar">
                        <asp:Label ID="Label1" runat="server" CssClass="titleContent">Transfer Lookup</asp:Label>
                    </div>
                    <div class="primaryFrameNoBorder" style='text-align:left'>
                        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                            <ContentTemplate>
                                <uc:SaleLookup ID="salesLookup" ButtonText="Add to Transfer" runat="server"></uc:SaleLookup>
                            </ContentTemplate>
                        </asp:UpdatePanel>
                    </div>
                </asp:Panel>
            </td>
        </tr>
    </table>
</asp:Content>
